from django.shortcuts import render
from requests import request
from django.http import HttpResponse
from django.views import View


def register(request):
    print(request.method)
    return HttpResponse('注册')


class register_view(View):
    """
    1.类视图 继承View
    2.根据不同请求方式 写不同的函数来处理
    """

    def get(self, request):
        return HttpResponse('注册页面')

    def post(self, request):
        return HttpResponse('注册成功')
